home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / MultiSession 1.04 Source / Core 27⁄June⁄1993 / EventLoop.h < prev   
Encoding:
C/C++ Source or Header  |  1993-05-30  |  1.1 KB  |  52 lines  |  [TEXT/KAHL]

  1. /* EventLoop.h */
  2.  
  3. #pragma once
  4.  
  5. #include "CObject.h"
  6.  
  7. class CWindow;
  8. class CViewRect;
  9.  
  10. #define MENUMINFLASH (5)
  11.  
  12. #define DefaultSleepTime (15)
  13.  
  14. typedef struct
  15.     {
  16.         LongPoint        Where;
  17.         long                When;
  18.         short                Modifiers;
  19.         long                Message;
  20.     } MyEventRec;
  21.  
  22. struct    CIdle    :    CObject
  23.     {
  24.         ulong        MinSleepTime;
  25.         EXECUTE(MyBoolean Installed;)
  26.  
  27.         EXECUTE(/* */    CIdle();)
  28.         EXECUTE(/* */ ~CIdle();)
  29.         void        DoIdle(long TimeSinceLastEvent);
  30.     };
  31.  
  32. void                    InitMyEventLoop(void);
  33. void                    ShutDownMyEventLoop(void);
  34. void                    TheEventLoop(CWindow* TheModalWindow);
  35. void                    RegisterIdler(CIdle* TheIdler, long MinSleepTime);
  36. void                    DeregisterIdler(CIdle* TheIdler);
  37. void                    SendIdleToAll(void);
  38. void                    SendIdleToAllJudiciously(void);
  39. MyBoolean            RelinquishCPU(void);
  40. MyBoolean            RelinquishCPUJudiciously(void);
  41.  
  42. #ifndef COMPILING_EVENTLOOP_C
  43.     extern CViewRect*    LastMouseDownViewRect;
  44.     extern CViewRect*    KeyReceiverViewRect;
  45.     extern CViewRect*    LastKeyDownViewRect;
  46.     extern MyBoolean    QuitPending;
  47.     extern MyBoolean    WeAreActiveApplication;
  48.     extern MyBoolean    ModalWindowTerminationFlag;
  49.     extern short            LastModifiers;
  50.     extern ulong            LastModifiersTime;
  51. #endif
  52.